package com.bemes.ecmn.model;

public class ECMNSubModel extends ECMNGenericObject {

	private ECMNCompositionObject m_childModel;
	
	public ECMNSubModel()
	{
		m_childModel = null;
	}
	
	public boolean makeECMNOjectSubModel(ECMNCompositionObject obj)
	{
		if(obj != null)
		{
			m_childModel = obj;
			return true;
		}
		
		return false;
	}
	
	@Override
	public int getAmountOfEquipment() {
		int numOfEq = 0;
		
		if(m_childModel != null)
		{
			numOfEq = m_childModel.getAmountOfEquipment();
		}
		
		return numOfEq;
	}

	@Override
	public ECMNEnum getObjectType() {
		return (ECMNEnum.SUB_MODEL);
	}

}
